package com.oxygen.pt.service;

import com.github.pagehelper.PageInfo;
import com.oxygen.pt.pojo.dto.PressureVesselInspectionDailySaveDTO;
import com.oxygen.pt.pojo.entity.PressureVesselInspectionDaily;
import com.oxygen.pt.pojo.vo.OxygenChamberInspectionPageVO;
import jakarta.servlet.http.HttpServletResponse;

import java.io.IOException;
import java.time.LocalDateTime;

public interface PressureVesselInspectionDailyService {
    /**
     * 新增日巡检记录
     * @param dto 前端传入DTO
     * @return 是否成功
     */
    boolean save(PressureVesselInspectionDailySaveDTO dto);

    /**
     * 根据主键删除
     * @param id 主键
     * @return 是否成功
     */
    boolean removeById(Long id);

    /**
     * 根据主键查询
     * @param id 主键
     * @return 实体
     */
    PressureVesselInspectionDaily getById(Long id);

    /**
     * 根据主键全量更新
     * @param id  主键
     * @param dto 新值
     * @return 是否成功
     */
    boolean updateById(Long id, PressureVesselInspectionDailySaveDTO dto);

    PageInfo<OxygenChamberInspectionPageVO> pageOxygenChamber(String inspector,
                                                              LocalDateTime startTime,
                                                              LocalDateTime endTime,
                                                              int pageNum,
                                                              int pageSize);

    void exportExcel(HttpServletResponse response,
                     LocalDateTime start,
                     LocalDateTime end) throws IOException;
}
